<template>
	<view class="">
		<ls-page title='首页' :hidden="true"  :userIdentity='0' leftIcon='' :autoBack='false'>
			<view class="home-container">
				<view class="top-contianr">
					<image class="meng-top" src="https://oss.jtmckj.com/wmp/kbq/home/i_icon_meng.png" mode="" />
					<!-- <image class="banner" src="https://oss.jtmckj.com/backend/Organize/banner.png" mode="" /> -->
					<image class="banner" :src="shopInfo?.miniBackgroundImage" mode="" />
					<!-- <image class="meng-bottom" src="https://oss.jtmckj.com/wmp/kbq/home/i_icon_meng1.png" mode="" /> -->
				</view>
				<view class="top-content">
					<view class="content-box">
						<view class="home-wifi">
							<!-- <view class="home-wifi-button">
							<image class="home-wifi-image" src="https://oss.jtmckj.com/wmp/images/home/index/i_icon_wifi.png" mode="aspectFill"> </image>
							<text class="home-wifi-text">一键链接</text>
						</view> -->
						</view>
						<view class="title-flex spe" style="padding-left: 0;padding-right: 0;">
							<view class="title" @click="onLocation">
								<view class="title-icon"></view>
								<view class="addres-text">
									{{baseConfig?.orgAddress ? baseConfig.orgAddress : ''}}
								</view>
							</view>
							<!-- <view class="orgecode" v-if="storeTableInfo">桌号：{{storeTableInfo.name}}</view> -->
						</view>
						<view class="flex-1-img">
							<view class="item" @click="SacnOrder">
								<image class="item-left" src="https://oss.jtmckj.com/h5-uniapp/ams/home/i_icon_order.png"
									mode="" />
								<view class="item-right">
									<view class="item-right-top">
										扫码点单
									</view>
									<view class="item-right-bottom">
										Scan QR code order
									</view>
									<view class="orgecode" v-if="storeTableInfo">{{storeTableInfo.name}}</view> 
								</view>
							</view>
                            <view class="order-border"></view>
							<view class="item" @click="topath('每屏互娱')" style="">
							<!-- <view class="item" @click="noFine" style=""> -->
								<image class="item-left" src="https://oss.jtmckj.com/h5-uniapp/xxc/home/mphy-icon.png"
									mode="" />
								<view class="item-right">
									<view class="item-right-top">
										每屏互娱
									</view>
									<view class="item-right-bottom">
										Mutual entertainment
									</view>
								</view>
							</view>
						</view>
						<view class="ktm-continar">
							    <view class="title-flex title-flex-bg">
							    	<view class="title" style="color: #fff;">Hi！欢迎光临！{{userInfo.name}}</view>
							    	<view class="call" @click="callShow = true">
							    		<view class="call-title">
							    			联系客服
							    		</view>
										<image class="kfimg" src="https://oss.jtmckj.com/wmp/kbq/newshome/kf-arrow.png"
											mode="" />
							    	</view>
							    </view>
							    
							    <view class="flex-2-img">
									  <view class="" style="display: flex;justify-content: space-between;width: 100%;">
									  	     <view class="left-box">
									  	     	<view class="itemSpe" @click="topath('/subpkg/view/centerStore/centerStore')">
									  	     		<image class="item-top" src="https://oss.jtmckj.com/h5-uniapp/ams/home/i_icon_store.png"
									  	     			mode="" />
									  	     		<view class="item-center">储值</view>
									  	     		<view class="item-bottom">Member recharge</view>
									  	     	</view>
									  	     </view>
									  	     <view class="right-box" @click.stop="topath('/subpkg/view/gift/gift')">
									  	     	<view class="item spe right-item-bg">
									  	     		<image class="item-left" src="https://oss.jtmckj.com/h5-uniapp/ams/home/song.png"
									  	     			mode="" />
									  	     		<view class="item-right">
									  	     			<view class="item-right-top">
									  	     				点歌
									  	     			</view>
									  	     			<view class="item-right-bottom">
									  	     				Choose a song
									  	     			</view>
									  	     		</view>
									  	     	</view>
									  	     	<view class="item spe right-item-bg" @click.stop="showWine = true">
									  	     	<!-- <view class="item spe" @click.stop="noFine"> -->
									  	     		<image class="item-left" src="https://oss.jtmckj.com/h5-uniapp/ams/home/i_icon_wine.png"
									  	     			mode="" />
									  	     		<view class="item-right">
									  	     			<view class="item-right-top">
									  	     				存取酒
									  	     			</view>
									  	     			<view class="item-right-bottom">
									  	     				Storage or retrieval
									  	     			</view>
									  	     		</view>
									  	     	</view>
									  	     </view>
									  </view>
								</view>
								<view class="jt-flex">
									    <view class="jt-item" @click.stop="topath('/pagesPointShop/view/index')">
									    	   <image class="item-left" src="https://oss.jtmckj.com/h5-uniapp/ams/home/i_icon_yh.png"
									    	   	mode="" />
												<view class="item-right">
													<view class="item-right-top">
														优惠商城
													</view>
													<view class="item-right-bottom">
														Points mall
													</view>
												</view>
									    </view>
										<view class="jt-item" @click.stop="topath('/subpkg/view/feedBack/feedBack')">
											   <image class="item-left" src="https://oss.jtmckj.com/h5-uniapp/ams/home/i_icon_yj.png"
												mode="" />
												<view class="item-right">
													<view class="item-right-top">
														意见反馈
													</view>
													<view class="item-right-bottom">
														Feedback
													</view>
												</view>
										</view>
								</view>
						</view>
					
						<view class="pz-img-box">
							<scroll-view class="scroll-view" scroll-x="true">
								<image style="border-radius: 16rpx;" v-for="(v,k) in shopInfo?.bottomList" @click="toAdvOther(v)" :key="k"
									:src="v.carouselPic" mode="widthFix" />
							</scroll-view>
						</view>
					</view>
				</view>
			</view>
		</ls-page>
		<!-- 存取酒 -->
		<x-popup position="center" :show="showWine" :closeIcon="true" :closeOnClickOverlay="true"
			@update:show="showWine = $event">
			<view class="popup-wine">
				<view class="popup-wine-title">当前桌台：{{storeTableInfo.name}}</view>
				<view style="height:60rpx"></view>
				<view class="popup-wine-control">
					<view class="popup-wine-btn" bind:tap="onWineThrottle" @click="onWine('set')">我要寄存</view>
					<view class="popup-wine-btn" bind:tap="onWineThrottle" @click="onWine('get')">我要取酒</view>
				</view>
			</view>
		</x-popup>
		<!-- 呼叫服务 -->
		<x-popup position="center" :show="callShow" :closeIcon="true" :closeOnClickOverlay="true" @close="customService"
			@update:show="callShow = $event">
			<view class="popup-wine">
				<view class="popup-wine-top">
					<view class="top-title" style="color:var(--maincolorf1)">
						当前桌台：{{storeTableInfo.name}}
					</view>
					<!-- <view class="top-value">
				      {{table?table:''}}
				    </view> -->
				</view>
				<view style="height:60rpx"></view>
				<view class="popup-wine-control">
					<view class="popup-wine-btn" @click="onCall('get')">呼叫</view>
					<view class="popup-wine-btn" @click="onCall('set')">扫码呼叫</view>
				</view>
			</view>
		</x-popup>
		<x-popup position="center" :show="activityShow" :closeOnClickOverlay="true" @close="activityShow = false">
			<view class="activityShow-content">
				<view class="activityShow-title" style="color:var(--maincolorf1)">
					{{shopInfo.sendCouponRemark}}
				</view>
				<view style="height:60rpx"></view>
				<view class="activityShow-btn" @click.stop="topath('优惠券')">
					快去领取吧
				</view>
			</view>
		</x-popup>
		<x-popup class="adv-popup" position="center" v-if="shopInfo.headerPicture" :show="showAdv" :closeOnClickOverlay="true"
			@close="showAdv = false" closeImag="https://oss.jtmckj.com/h5-uniapp/qnig/my/close-write.png">
			<image @click.stop="showAdv = false" class="close"
				src="https://jtmc.oss-cn-hangzhou.aliyuncs.com/wmp/qnjg/common/i_close.png"></image>
			<!-- <image @click="topath('/subpkg/view/centerStore/centerStore')" class="wh100"
				src="https://jtmc.oss-cn-hangzhou.aliyuncs.com/wmp/qnjg/common/i_adv.jpg"></image> -->
			<image @click="topath('/subpkg/view/centerStore/centerStore')" class="wh100"
				:src="shopInfo.headerPicture"></image>
		</x-popup>
	</view>



</template>

<script setup>
	import { onLoad, onReachBottom, onPullDownRefresh, onShow, onHide, onPageScroll } from '@dcloudio/uni-app';
	import { ref } from 'vue';
	import { initStatusBarHeight } from "@/until/tools.js"
	import { HFiveAppObjProcess, HFiveMemberAppObjProcess, GetMinimsgTemplate } from '@/api/public.js'
	import { getWeChatJsSDKConfig, _ExtractParamsFromPath, initTableInfoFinish, initTableInfo, updateTableInfo } from '@/until/tools.js'
	import wx from "weixin-js-sdk";
	import { useTableStore } from '@/store/table.js';

	// -------------------------------------------------------初始化数据-----------------------------------------------------
	const showAdv = ref(false)
	const shopInfo = uni.getStorageSync('shopInfo') //门店信息
	const userInfo = uni.getStorageSync('userInfo') //用户信息
	const tableInfo = uni.getStorageSync('tableInfo') //桌台信息 
	const callForm = ref({
		memberMsgType: "", // 001 呼叫服务员  002 申请存酒
		memberName: "",
		memberMobile: "",
		roomCode: "",
	}) 
	const navbarHeight = computed(() => {
		return initStatusBarHeight() || 200;
	}); 
	const storeTableInfo = ref({
		code:'',
		name:''
	})
	const BottomList = ref([ ]);
	const address = ref('')
	const toPing = () => {
		console.log('跳转到 Ping 页面');
	};

	const globalData = ref({})

	let params = ref({
		brandCode: '', //品牌必传
		org: '', // 门店必传
		link: '', // 调转的小程序path必传
		code: '',
		name: '',
		version: 'trial', //  trial 为体验版  release 正式版
	})
     
	const SDKConfig = ref({})

	const tableName = ref("") // 当前房台
	const tableCode = ref("") // 当前房台编号
	// -------------------------------------------------------初始化数据-----------------------------------------------------
	const toAdvOther = (v)=>{
		if (!v.carouselUrl) {
		      return
		}
		if(v.carouselUrlType == '1'){ // 外部网页
			window.location.href =  v.carouselUrl
		}else if(v.carouselUrlType == '2'){ // 外部小程序
			
		}else if(v.carouselUrlType == '3'){ // 内部小程序
			uni.navigateTo({
				url: v.carouselUrl
			})
		}
		
	}
	const topath = (url) => {
		if(url == '优惠券') {
			activityShow.value = false
			uni.switchTab({
				url: '/pages/coupon/index'
			})
		} else if (url =='每屏互娱') {
				if(shopInfo.miniScreenType == '0'){ // 0内部  1外部
					uni.navigateTo({
						url: shopInfo.miniScreen
					})
				}else{
					window.location.href = shopInfo.miniScreen
				}
				
			}
		showAdv.value = false
		uni.navigateTo({
			url: url
		})
	}
	const noFine = ()=>{
		uni.showToast({ title: "正在开发中，敬请期待！", icon: "none" });
	}
	//----------------------------------------------------------------------------点单扫码----------------------------------------------------------------------
	const SacnOrder = async () => {
		if (shopInfo && shopInfo.isCloseMiniOrder) {
			uni.showToast({ title: "门店已关闭点单功能", icon: "none" });
			return
		}
		//1.获取当前房台
		let res = uni.getStorageSync('tableInfo')
		if (res && res.code) {  
			uni.navigateTo({
				url: '/pagesOrder/view/goods/index'
			})
			updataTableFun(res.code) 
		} else {
			// // 测试
			// let code = '0017093'
			// updataTableFun(code)
			// return
			uni.removeStorageSync('tableInfo')
			wx.config({
				debug: false, // 开启调试模式,
				appId: SDKConfig.value.appId, // 必填，企业号的唯一标识
				timestamp: SDKConfig.value.timestamp, // 必填，生成签名的时间戳
				nonceStr: SDKConfig.value.nonceStr, // 必填，生成签名的随机串
				signature: SDKConfig.value.signature, // 必填，签名
				jsApiList: ['scanQRCode'], // 必填，需要使用的JS接口列表
			});
			wx.ready((res) => {
				wx.scanQRCode({
					needResult: 1, // 默认为0，扫描结果由微信处理，1则直接返回扫描结果，
					scanType: ['qrCode', 'barCode'], // 可以指定扫二维码还是一维码，默认二者都有
					success:async function(res) {
						if (res.resultStr) {
							const options = _ExtractParamsFromPath(res.resultStr);
							if (!options.code) {
								uni.showToast({ title: "二维码出错", icon: "none" });
								return
							} 
							await updataTableFun(options.code) 
							uni.navigateTo({
								url: '/pagesOrder/view/goods/index'
							})
						} 
					},
					fail: function(response) {
						uni.showToast({ title: "请扫描正确的二维码", icon: "none" });
					},
				});
			}) 
		} 
	}
	
	// 
	const updataTableFun = async(code) => { 
		console.log(code);
		let obj = {
			code:code
		}
		uni.setStorageSync('tableInfo',obj) // initTableInfo方法会更新 先存一个code就行
		const result = await updateTableInfo(code) 
		const tableInfo = await initTableInfo()
		if(shopInfo && shopInfo.isOpenRoom) {
		   await RoomOpenFun()
		}
		console.log('tableInfo:',tableInfo)
	}  		  

	// 扫码成功，则默认自动开台操作，如果开台失败则需联系线下服务员开台
	const RoomOpenFun = (typeName) => {
		let modal = {
			"functionName": "MemberRoomOpen_H5",
			"contentData": {
				"memberName": userInfo.name,
				"memberMobile": userInfo.mobile,
				"memberOpenid": userInfo.openId,
				"sex": userInfo.sex,
				"roomCode": storeTableInfo.value.code
			}
		}
		HFiveMemberAppObjProcess(modal)
	}
	// 储蓄 memRecharge
	const toMemRecharge = () => {
		params.value.link = 'memRecharge'
		console.log('点击了~储蓄');
		publicToWx()
	};

	//  优惠券 coupon
	const toCoupon = () => {
		params.value.link = 'coupon'
		console.log('点击了~优惠券');
		publicToWx()
	};

	//  存取酒 
	const toOnwine = () => {
		params.value.link = 'onwine'
		console.log('点击了~存取酒 ');
		publicToWx()
	};

	//  投诉建议 feedBack
	const toFeedBack = () => {
		params.value.link = 'feedBack'
		console.log('点击了~投诉建议 ');
		publicToWx()
	};

	// 订单  orderList
	const toOrderList = () => {
		params.value.link = 'orderList'
		console.log('点击了~tabbar订单 ');
		publicToWx()
	};

	// 我的  center
	const toCenter = () => {
		params.value.link = 'center'
		console.log('点击了~tabbar我的 ');
		publicToWx()
	};

	// 其它 other
	const toOther = (v) => {
		// params.value.link = 'other'
		// console.log('点击了~其它');
		// publicToWx()
			if(v =='优惠商城') {
					uni.navigateTo({
						url:'/pagesPointShop/view/index'
					})
				} else if(v == '拼桌') {
				uni.navigateTo({
					url:'/pagesSquare/index'
				})
			}
	};

	const baseConfig = ref(null)
	//获取初始获取门店信息
	const getBaseConfigInfo = () => {
		baseConfig.value = uni.getStorageSync('shopInfo')
		// try {
		// 	const res = await http.get('/GetBaseConfigInfos' + '?orgCode=' + params.value.org + '&brandCode=' + params.value.brandCode);
		// 	if (res.opFlag == 1) {
		// 		baseConfig.value = JSON.parse(res.content.objectList[0].rowData)
		// 		console.log(baseConfig.value, 'res.content.objectList[0].rowData')
		// 	}
		// } catch (error) {
		// 	console.error('Error:', error);
		// }
	}

	const bgColor = ref('transparent');

	// 一定要有参数 否则白瞎
	onLoad(async (options) => {
	
		params.value.brandCode = options.brd // ||  '0005'
		params.value.org = options.org // || '0018'
		params.value.link = options.link
		params.value.code = options.code
		params.value.name = options.name
		console.log('options-params', params.value)
		globalData.value = options
		// const globalData = uni.getStorageSync('globalData')
		// console.log(globalData, 'globalData')
		getBaseConfigInfo()
		getWeChatJsSDKConfig().then(resking => {
			SDKConfig.value = resking
		})
	
		getActivity()
		// getUserInfo()
	});

	onShow(async()=>{
		let res = await initTableInfoFinish() // 拉取用户桌台信息
		if (res.currentRoomName) {  
			tableCode.value = res.currentRoomCode
			uni.setStorageSync('tableInfo',{ // 存到本地
				code:res.currentRoomCode,
				name:res.currentRoomName
			})
		}else{
			uni.removeStorageSync('tableInfo')
		}
		storeTableInfo.value  = uni.getStorageSync('tableInfo') || {} // 获取本地数据
		userInfo.value = uni.getStorageSync('userInfo') // 获取用户信息
		
		let toolAdv = uni.getStorageSync('showAdv')
		if (toolAdv) { // 弹一次广告就行
			showAdv.value = true
			uni.removeStorageSync('showAdv')
		} else {
			showAdv.value = false
		}
		// storeTableInfo.value  = uni.getStorageSync('tableInfo') || {}
	})
	const onLocation = () => {
		uni.navigateTo({
			url: '/subpkg/view/switchStores/switchStores'
		})
	}
	const callShow = ref(false)
	const showWine = ref(false)

	const customService = () => {
		console.log('11')
		callShow.value = false
	}
	const onWine = (type) => {
		if (type == "set") {
			// 存酒呼叫
			callWaiter("002", tableCode.value);

			//       GetMinimsgTemplate({ msgTrigger: '4' })
			//         .then(res => { 
			//              console.log(res.rowData,'DI')
			//           uni.requestSubscribeMessage({
			//             tmplIds: res.rowData,
			//             success(res) {

			//             },
			//             fail(res) {

			//             }
			//           });

			//         })
		} else {
			//       GetMinimsgTemplate({ msgTrigger: '4' })
			//         .then(res => {
			//           uni.requestSubscribeMessage({
			//             tmplIds: [res.rowData[3]],
			//             success(res) {

			//             },
			//             fail(res) {
			//             }
			//           });
			//         })
			userInfo.tableCode = tableCode.value;
			showWine.value = false
			// if (app.global.isMember) {
			// this.navTo("/pages/center/onWine/index");
			uni.navigateTo({
				url: '/subpkg/view/accessCohol/accessCohol'
			})
			// }


		}
	}

	// 存取酒-呼叫服务
	const callWaiter = (type, roomCode) => {
		if (!roomCode) {
			uni.showToast({ title: "请先扫码获取房台", icon: "none" });
			return
		}
		callForm.value.memberName = userInfo.name;
		callForm.value.memberMobile = userInfo.mobile;
		callForm.value.memberMsgType = type;
		callForm.value.roomCode = roomCode;
		HFiveMemberAppObjProcess({
			functionName: "CallWaiter_H5",
			contentData: callForm.value,
		}).then((res) => {
			console.log(res, 'res-----------')
			uni.showToast({ title: res.data, icon: "none" });
			showWine.value = false
			callShow.value = false
		});
	}


	// 客观吩咐-呼叫服务
	const onCall = (type) => {

		if (type == "set") {
			// uni.scanCode({
			//   success: (res) => {
			//     // 扫码成功
			//     const options = _ExtractParamsFromPath(res.result);
			//     if (!options.code) {
			//       uni.showToast({ title: "二维码出错", icon: "none" });
			//       return
			//     }
			//     // 存酒扫码
			//     callWaiter("001", options.code);
			//   },
			//   fail(res) { },
			// });
			wx.config({
				debug: false, // 开启调试模式,
				appId: SDKConfig.value.appId, // 必填，企业号的唯一标识
				timestamp: SDKConfig.value.timestamp, // 必填，生成签名的时间戳
				nonceStr: SDKConfig.value.nonceStr, // 必填，生成签名的随机串
				signature: SDKConfig.value.signature, // 必填，签名
				jsApiList: ['scanQRCode'], // 必填，需要使用的JS接口列表
			});
			wx.ready((res) => {
				wx.scanQRCode({
					needResult: 1, // 默认为0，扫描结果由微信处理，1则直接返回扫描结果，
					scanType: ['qrCode', 'barCode'], // 可以指定扫二维码还是一维码，默认二者都有
					success: function(res) {
						if (res.resultStr) {
							const options = _ExtractParamsFromPath(res.resultStr);
							if (!options.code) {
								uni.showToast({ title: "二维码出错，请联系服务开台", icon: "none" });
								return
							}
							// 存酒扫码
							callWaiter("001", options.code);
						}
					},
					fail: function(response) {
						uni.showToast({ title: "请扫描正确的二维码", icon: "none" });
					},
				});
			})

		} else {
			if (!tableCode.value) {
				uni.showToast({ title: "未选桌台，请扫码呼叫", icon: "none" });
				return;
			}
			// 呼叫
			callWaiter("001", tableCode.value);
		}
	}

	const activityShow = ref(false)
	const  getActivity = ()=>{
		let shopInfo = uni.getStorageSync('shopInfo')
		if(shopInfo && shopInfo.setSendCoupon && uni.getStorageSync('NewMember')){
			  activityShow.value = true
			  uni.removeStorageSync('NewMember')
		}
	}
	// 
</script>
<style scoped lang="less">
	.top-contianr {
		height: 750rpx;
		position: absolute;
		// position: relative;
		top: 0;
		left: 0;
		width: 100%;
		z-index: 1;

		.meng-top {
			width: 100%;
			height: 200rpx;
			position: absolute;
			top: 0;
			left: 0;
			z-index: 10;
		}

		.banner {
			width: 100%;
			height: 750rpx;
			z-index: 10;
		}

		.meng-bottom {
			width: 100%;
			height: 750rpx;
			position: absolute;
			bottom: 0;
			left: 0;
			z-index: 10;
		}
	}

	.top-content {
		position: relative;
		z-index: 11;
		padding: 570rpx 0 0rpx;

		.banner {
			width: 100%;
			height: 320rpx;
		}

		.content-box {
			position: relative;
			z-index: 5;
			padding: 0 24rpx 140rpx;
             .ktm-continar {
				 margin-top: 20rpx;
				  background: #0D0D0D;
				  border-radius: 16rpx;
				  margin-bottom: 20rpx;
			 }
			 .title-flex-bg {
				  background: #990F0F;
				  height: 60rpx !important;
				  padding: 0 18rpx 0 30rpx !important;
			 }
			.title-flex {
				//   height: 115rpx;
				padding: 0 23rpx 40rpx 31rpx;
				height: 30rpx;
				display: flex;
				align-items: center;
				justify-content: space-between;
                border-radius: 16rpx 16rpx 0rpx 0rpx;
				&.spe {
					.title {
						font-family: PingFang SC;
						font-weight: 500;
						font-size: 24rpx;
						color:#fff;
						line-height: 24rpx;
						display: flex;
						align-items: center;

						.title-icon {
							width: 16rpx;
							height: 20rpx;
							background-image: url('https://oss.jtmckj.com/wmp/kbq/newshome/address.png');
							background-size: cover;
							background-repeat: no-repeat;
							background-position: center;
							margin-right: 8rpx;
						}

						.addres-text {
							color: #ffffff;
							width: 540rpx;
							height: 40rpx;
							line-height: 40rpx;
							background: rgba(0,0,0,0.5);
							border-radius: 4rpx;
							white-space: nowrap;
							overflow: hidden;
							text-overflow: ellipsis;
						}
					}

					.orgecode {
						font-family: PingFang SC;
						// font-weight: bold;
						font-size: 32rpx;
						color:#212121;
						line-height: 32rpx;
					}
				}

				.title {
					color:var(--maincolorf1);
					font-size: 24rpx;
				}

				.orgecode {
					color:var(--maincolorf1);
					font-size: 30rpx;
				}

				.call {
					height: 48rpx;
					border-radius: 8rpx;
					display: flex;
					align-items: center;

					.kfimg {
						margin-top: 4rpx;
						width: 12rpx;
						height: 18rpx;
						margin-left: 5rpx;
					}

					.call-title {
						font-family: PingFang SC;
						font-weight: 500;
						font-size: 24rpx;
						color:#fff;
						line-height: 24rpx;
					}
				}
			}

			.flex-1-img {
				display: flex;
				justify-content: space-between;
                height: 160rpx;
                background: #2E2E2E;
                border-radius: 16rpx;
				position: relative;
				.item {
					width: 340rpx;
					height: 148rpx;
				}
				.order-border {
					 position: absolute;
					 top: 25%;
					 right: 50%;
					 width: 2rpx;
					 height: 80rpx;
					 background: #CCCCCC;
					 border-radius: 1rpx;
				}
			}

			.title-flex-2 {
				//   height: 110rpx;
				padding: 40rpx 0 20rpx;
				display: flex;
				align-items: center;
				justify-content: flex-end;
				position: relative;

				.title2 {
					position: absolute;
					left: -24rpx;
					width: 180rpx;
					height: 48rpx;
					background-image: url('https://oss.jtmckj.com/wmp/ch/center/i_home_other.png');
					background-size: cover;
					background-position: center;
					background-repeat: no-repeat;
				}

				.kfimg {
					width: 180rpx;
					height: 48rpx;
				}
			}

			.flex-2-img {
				padding: 24rpx 24rpx 0 24rpx;
				display: flex;
				justify-content: space-between;

				//   height: 400rpx;
				.left-box {
					display: flex;
					flex-direction: column;
					justify-content: space-between;

					.imgbg1 {
						width: 340rpx;
						height: 260rpx;
					}

					.imgbg2 {
						width: 340rpx;
						height: 120rpx;
					}
				}

				.right-box {
					display: flex;
					flex-direction: column;
					justify-content: space-between;

					.itemimg {
						width: 340rpx;
						height: 120rpx;
					}
				}
			}

		}

	}

	.item {
		display: flex;
		align-items: center;
		// background: var(--mainbaccolor10);
		border-radius: 16rpx;
		width: 316rpx;
		height: 260rpx;

		&.spe {
			height: 120rpx;
			margin-bottom: 20rpx;
			box-sizing: border-box;
		}

		.item-left {
			width: 60rpx;
			height: 60rpx;
			margin-right: 20rpx;
			margin-left: 60rpx;
		}

		.item-right {
			position: relative;
			.item-right-top {
				font-family: PingFang SC;
				font-weight: bold;
				font-size: 36rpx;
				color:#fff;
				line-height: 36rpx;
				margin-bottom: 10rpx;
			}

			.item-right-bottom {
				font-family: PingFang SC;
				font-weight: 400;
				font-size: 16rpx;
				color: #CCCCCC;
				line-height: 16rpx;
			}
			.orgecode{
				position: absolute;
				bottom: -40rpx;
				font-family: PingFang SC;
				font-weight: bold;
				font-size: 24rpx;
				color: #C7000B;
				line-height: 24rpx;
			}
		}
	}

	.itemSpe {
		width: 316rpx;
		height: 260rpx;
		box-sizing: border-box;
		background: #2E2E2E;
		border-radius: 16rpx;
		text-align: center;
		margin-bottom: 20rpx;
		padding-top: 47rpx;

		.item-top {
			width: 60rpx;
			height: 60rpx;
			margin-bottom: 31rpx
		}

		.item-center {
			font-family: PingFang SC;
			font-weight: bold;
			font-size: 48rpx;
			color:#fff;
			line-height: 48rpx;
			margin-bottom: 16rpx;
		}

		.item-bottom {
			font-family: PingFang SC;
			font-weight: 500;
			font-size: 20rpx;
			color: #CCCCCC;
			line-height: 20rpx;
		}
	}

	.footer-continar {
		position: fixed;
		bottom: 0rpx;
		width: 100%;
		// height: 150rpx;
		padding: 30rpx 0;
		background-color: var(--mainbaccolor22);

		.footer-tab-box {
			padding: 0 32rpx;
			display: flex;
			justify-content: space-between;
		}

		.tab-item {
			display: flex;
			flex-direction: column;
			justify-content: center;
			align-items: center;

			.tab-icon {
				width: 44rpx;
				height: 44rpx;
			}

			text {
				color: var(--maincolorf4);
				font-size: 24rpx;
			}
		}
	}

	button {
		background-color: transparent;
		border: none;
		color: inherit;
		font: inherit;
		line-height: normal;
		overflow: visible;
		outline: none;
		cursor: pointer;
		padding: 0;
		margin: 0;
	}

	button::after {
		border: none;
	}

	.button-hover {
		background-color: transparent;
	}

	.home-container {
		width: 100%;
		height: 100%;
		overflow: scroll;
		background:  #1A1A1A;

		.home-wrapper {
			padding: 0 24rpx;
			box-sizing: border-box;
		}

		.home-logo {
			padding-top: 105rpx;
			text-align: center;
			font-size: 0;

			&-image {
				width: 112rpx;
				height: 100rpx;
			}
		}

		.home-sublogo {
			padding-top: 34rpx;
			text-align: center;
			font-size: 0;

			&-image {
				width: 564rpx;
				height: 212rpx;
			}
		}

		.home-wifi {
			display: flex;
			justify-content: flex-end;
			padding-top: 9rpx;

			&-button {
				display: flex;
				align-items: center;
				background-color: var(--mainbaccolor19);
				padding: 8rpx 16rpx;
				font-size: 0;
				border-radius: 4rpx;
			}

			&-image {
				width: 24rpx;
				height: 24rpx;
			}

			&-text {
				font-family: PingFang SC;
				font-weight: 500;
				font-size: 24rpx;
				color: var(--maincolor);
				line-height: 24rpx;
			}
		}

		.home-main {
			// background: #000000;
			border-radius: 60rpx 60rpx 0rpx 0rpx;
			padding: 0 16rpx 140rpx;
			box-sizing: border-box;
			margin-top: 18rpx;

			&-heading {
				display: flex;
				justify-content: space-between;
				align-items: center;
				padding: 40rpx 20rpx 0rpx 40rpx;
				box-sizing: border-box;
			}

			&-user {
				display: flex;
				align-items: center;
				padding-bottom: 40rpx;
			}

			&-user__cover {
				width: 80rpx;
				height: 80rpx;
				border-radius: 50%;
				background-repeat: no-repeat;
				background-size: cover;
			}

			&-user__nickname {
				font-family: PingFang SC;
				font-weight: 500;
				font-size: 32rpx;
				color: var(--maincolor);
				line-height: 32rpx;
				padding-left: 16rpx;
				overflow: hidden;
				text-overflow: ellipsis;
				white-space: nowrap;
				width: 210rpx;
			}

			&-location {
				font-family: PingFang SC;
				font-weight: 500;
				font-size: 24rpx;
				color: var(--maincolorf6);
				line-height: 24rpx;
				padding: 28rpx 18rpx 0 22rpx;
				position: relative;
				overflow: hidden;
				/* 隐藏溢出内容 */
				white-space: nowrap;
				/* 不换行 */
				text-overflow: ellipsis;
				/* 使用省略号表示溢出内容 */

				&::before {
					content: '';
					position: absolute;
					top: 16rpx;
					left: 0;
					width: 20rpx;
					height: 100%;
					background-image: url('https://oss.jtmckj.com/wmp/images/home/index/i_icon_location.png');
					background-size: 100% auto;
					background-position: left center;
					background-repeat: no-repeat;
				}

				&::after {
					content: '';
					position: absolute;
					top: 16rpx;
					right: 0;
					width: 18rpx;
					height: 100%;
					background-image: url('https://oss.jtmckj.com/wmp/images/home/index/i_icon_into.png');
					background-size: 100% auto;
					background-position: right center;
					background-repeat: no-repeat;
				}
			}

			&-table {
				font-family: PingFang SC;
				font-weight: 500;
				font-size: 24rpx;
				color: var(--maincolorf2);
				line-height: 24rpx;
				text-align: right;
				padding: 34rpx 20rpx 12rpx 0;
			}
		}

		.home-menu {
			// flex: 1;
			margin-bottom: 20rpx;

			&-list {
				display: flex;
				justify-content: space-between;
				flex-wrap: wrap;
			}

			&-item {
				display: flex;
				background-size: 100% 100%;
				box-sizing: border-box;

				&__info {
					display: flex;
					flex-direction: column;
					justify-content: space-between;
				}

				&.primary {
					width: 324rpx;
					padding: 53rpx 0;
					background-image: url('https://oss.jtmckj.com/wmp/images/home/index/i_menu_bg_primary.png');
					margin-top: 20rpx;
					padding-left: 64rpx;

					.home-menu-item__icon {
						width: 54rpx;
						height: 54rpx;
					}

					.home-menu-item__info {
						padding-left: 16rpx;
					}

					.home-menu-item__title {
						font-family: PingFang SC;
						font-weight: bold;
						font-size: 32rpx;
						color: var(--maincolor);
						line-height: 32rpx;
					}

					.home-menu-item__subtitle {
						font-family: PingFang SC;
						font-weight: 400;
						font-size: 24rpx;
						color: var(--maincolor);
						line-height: 24rpx;
						transform: scale(0.83);
						transform-origin: left;
						white-space: nowrap;
					}
				}

				&.full {
					width: 100%;
					padding: 70rpx 0;
					background-image: url('https://oss.jtmckj.com/wmp/images/home/index/i_menu_bg_full.png');
					padding-left: 248rpx;

					.home-menu-item__icon {
						width: 60rpx;
						height: 60rpx;
					}

					.home-menu-item__info {
						padding-left: 24rpx;
					}

					.home-menu-item__title {
						font-family: PingFang SC;
						font-weight: bold;
						font-size: 36rpx;
						color: var(--maincolor);
						line-height: 36rpx;
					}

					.home-menu-item__subtitle {
						font-family: PingFang SC;
						font-weight: 400;
						font-size: 24rpx;
						color: var(--maincolor);
						line-height: 24rpx;
					}
				}
			}

			&-item__info {}

			&-item__icon {}

			&-item__title {}

			&-item__subtitle {}
		}

		.home-toPing {
			height: 100rpx;
			background-image: url('https://oss.jtmckj.com/wmp/images/home/index/i_home_toPing.png');
			background-size: 100% auto;
			background-position: right center;
			background-repeat: no-repeat;
		}
	}

	.popup-wine {
		&-title {
			font-family: PingFang SC;
			font-weight: bold;
			font-size: 36rpx;
			color:var(--maincolorf1);
			line-height: 36rpx;
			padding: 20rpx 0 0 48rpx;
		}

		&-top {
			display: flex;
			align-items: center;
			padding: 40rpx 0 0 40rpx;
			font-family: PingFang SC;
			font-weight: bold;
			font-size: 36rpx;
			color: var(--maincolor);
			line-height: 36rpx;
		}

		&-control {
			width: 460rpx;
			display: flex;
			justify-content: space-between;
			box-sizing: border-box;
			// padding: 0 48rpx 28rpx;
		}

		&-btn {
			border-radius: 16rpx;
			background: var(--mainbaccolor5) !important;
			padding: 34rpx 0;
			width: 200rpx;
			font-family: PingFang SC;
			font-weight: 500;
			font-size: 32rpx;
			color:var(--maincolorf1);
			line-height: 32rpx;
			text-align: center;
			position: relative;
			// &::after {
			// 	content: '';
			// 	position: absolute;
			// 	top: 42rpx;
			// 	right: 45rpx;
			// 	width: 12rpx;
			// 	height: 22rpx;
			// 	background-image: url('https://oss.jtmckj.com/wmp/images/common/i_triangle_right.png');
			// 	background-size: 100% auto;
			// 	background-repeat: no-repeat;
			// }
		}

		&-h2 {
			padding: 0 0 40rpx 48rpx;
			font-family: PingFang SC;
			font-weight: 500;
			font-size: 32rpx;
			color: var(--maincolor);
			line-height: 32rpx;
		}

		.van-radio__label {
			font-family: PingFang SC;
			font-weight: 500;
			font-size: 32rpx;
			color: var(--maincolor);
			line-height: 32rpx;
		}

		.van-radio-group--horizontal {
			// padding: 0 48rpx 40rpx;
			justify-content: space-between;
			padding: 0 100rpx 25rpx 48rpx;
		}

		.van-radio--horizontal {
			margin: 0;
		}

		.feedback-value {
			background: var(--mainbaccolor20);
			border-radius: 16rpx;
			padding: 25rpx 24rpx;
			display: flex;
			align-items: center;
			justify-content: space-between;
			margin: 0 48rpx;

			.value-text {
				font-family: PingFang SC;
				font-weight: 500;
				font-size: 32rpx;
				color: var(--maincolorf2);
				line-height: 32rpx;
			}

			.value-right {
				display: flex;
				align-items: center;

				.right-value {
					font-family: PingFang SC;
					font-weight: 500;
					font-size: 32rpx;
					color: var(--maincolor);
					line-height: 32rpx;
					padding-right: 16rpx;
				}

				.right-icon {
					width: 12rpx;
					height: 22rpx;
					background-image: url('https://oss.jtmckj.com/wmp/images/center/i_icon_tra-right.png');
					background-size: 100% 100%;
					background-repeat: no-repeat;
				}
			}
		}
	}

	.popup-container {
		padding-bottom: 40rpx;

		.popup-container-header {
			display: flex;
			align-items: center;
			justify-content: space-between;
			// padding: 33rpx 60rpx 32rpx;
			border-bottom: 1px solid var(--maincolorbd11);

			.header-left {
				font-family: PingFang SC;
				font-weight: 500;
				font-size: 32rpx;
				color: var(--maincolorf4);
				line-height: 32rpx;
				padding: 33rpx 60rpx 32rpx;
			}

			.header-center {
				font-family: PingFang SC;
				font-weight: bold;
				font-size: 36rpx;
				color: var(--maincolorf15);
				line-height: 36rpx;
			}

			.header-right {
				font-family: PingFang SC;
				font-weight: 500;
				font-size: 32rpx;
				color:var(--maincolorf1);
				line-height: 32rpx;
				padding: 33rpx 60rpx 32rpx;
			}
		}

		.popup-container-main {
			padding: 20rpx 24rpx 0;
			display: flex;
			align-items: center;
			justify-content: flex-start;
			flex-wrap: wrap;

			.main-item {
				background: var(--mainbaccolor21);
				border-radius: 8rpx;
				font-family: PingFang SC;
				font-weight: 500;
				font-size: 32rpx;
				color: var(--maincolor);
				line-height: 80rpx;
				text-align: center;
			}

			.van-col {
				margin-bottom: 20rpx;
			}

		}

		.popup-container-footer {
			margin: 0 24rpx 160rpx;
			background: var(--mainbaccolor20);
			border-radius: 16rpx;
			padding: 24rpx 0rpx 4rpx 24rpx;
			display: flex;
			align-items: center;
			justify-content: flex-start;
			flex-wrap: wrap;

			.footer-item {
				// width: 118rpx; 
				padding: 0 26rpx;
				height: 60rpx;
				background: var(--mainbaccolor21);
				border-radius: 8rpx;
				text-align: center;
				margin-bottom: 20rpx;
				font-family: PingFang SC;
				font-weight: 500;
				font-size: 28rpx;
				color: var(--maincolor);
				line-height: 60rpx;
				margin-right: 16rpx;
			}
		}
	}

	.popup-login {
		&-title {
			font-family: PingFang SC;
			font-weight: bold;
			font-size: 36rpx;
			color: var(--maincolorf1);
			line-height: 36rpx;
			padding: 60rpx 0 0 48rpx;
		}

		&-top {
			// display: flex;
			// align-items: center;
			padding: 60rpx 0 0 0rpx;
			font-family: PingFang SC;
			font-weight: bold;
			font-size: 36rpx;
			color: var(--maincolorf1);
			line-height: 36rpx;
		}

		.top-title {
			text-align: center;
		}

		&-control {
			display: flex;
			justify-content: space-between;
			box-sizing: border-box;
			padding: 0 48rpx 68rpx;
			text-align: center;
		}

		&-btn {
			border-radius: 16rpx;
			background: var(--mainbaccolor4);
			// border: 1px solid #212121;
			padding: 34rpx 0;
			width: 230rpx;
			font-family: PingFang SC;
			font-weight: 500;
			font-size: 32rpx;
			color: var(--maincolor);
			line-height: 32rpx;
			text-align: center;
			position: relative;

		}

		&-h2 {
			padding: 0 0 40rpx 48rpx;
			font-family: PingFang SC;
			font-weight: 500;
			font-size: 32rpx;
			color: var(--maincolor);
			line-height: 32rpx;
		}

	}

	.tab-bar {
		position: fixed;
		bottom: 0;
		width: 100%;
		z-index: 900;
		// padding-bottom: constant(safe-area-inset-bottom); // 兼容 IOS 11.2 以下
		// padding-bottom: env(safe-area-inset-bottom); // 兼容 IOS 11.2 以上
	}

	.tab-bar-list {
		width: 100%;
		background: var(--maincolor);
		pointer-events: auto;
		position: relative;
		// padding: 10rpx 0 20rpx 0;
		display: flex;
		justify-content: center;
		align-items: center;
		padding-bottom: env(safe-area-inset-bottom); // 适配iphoneX的底部
	}

	.footer-tab-box {
		width: 100%;
		padding: 0 32rpx;
		display: flex;
		justify-content: space-between;
	}

	.tab-bar-item {
		flex: 1;
		text-align: center;
		display: flex;
		justify-content: center;
		align-items: center;
		flex-direction: column;
		position: relative;
		padding: 5px 0;

		&.active {
			background-color: var(--maincolor);
		}
	}
	.right-item-bg {
		background: #2e2e2e;
	}

	.tab-bar-item .tab-bar-icon {
		width: 44rpx;
		height: 44rpx;
	}

	.tab-bar-item .tab-bar-text {
		font-size: 10px;
		padding-top: 1px;
	}


	.pz-img-box {
		//   margin-top: 24rpx;
		//   width: 750rpx;
		display: flex;
		align-items: center;
		//   justify-content: space-between;
		//   overflow-x: auto;
		overflow: hidden;

		.scroll-view {
			width: 100%;
			overflow: hidden;
			white-space: nowrap;
			/* 防止换行 */
		}

		.img-box-item {
			display: inline-block;
			/* 让子项水平排列 */
			width: 100%;
			height: 120rpx;
			margin-right: 20rpx;

			// margin-right: 22rpx;
			.item-img {
				margin: 0;
				padding: 0;
				border: 0;
				display: block;
				/* 防止图片下方出现空白行 */
				height: 120rpx;
				width: 100%;
			}
		}

		image {
			width: 100%;
			height: 100%;
		}
	}
	.activityShow-content{
		text-align: center;
		min-width: 500rpx;
		.activityShow-title{
			padding-top: 10rpx;
			font-size: 36rpx;
			font-weight: bold;
			
		}
		.activityShow-btn{
			width: 280rpx;
			height: 60rpx;
			border: 4rpx solid var(--maincolorbd12);
			font-weight: bold;
			border-radius: 40rpx;
			font-family: PingFang SC;
			font-size: 32rpx;
			color: var(--maincolorf20);
			line-height: 60rpx;
			text-align: center;
			margin: 0 auto;
		}
	}
	
	.jt-flex { 
		display: flex;
		justify-content: space-between;
		padding: 0 24rpx 24rpx 20rpx ;
		 .jt-item {
			  	display: flex;
			  	align-items: center;
				background: #2E2E2E;
			  	border-radius: 16rpx;
			  	width: 316rpx;
			  	height: 120rpx;
			  
			  	&.spe {
			  		height: 120rpx;
			  		margin-bottom: 20rpx;
			  		box-sizing: border-box;
			  	}
			  
			  	.item-left {
			  		width: 60rpx;
			  		height: 60rpx;
			  		margin-right: 20rpx;
			  		margin-left: 60rpx;
			  	}
			  
			  	.item-right {
			  		position: relative;
			  		.item-right-top {
			  			font-family: PingFang SC;
			  			font-weight: bold;
			  			font-size: 36rpx;
			  			color:#fff;
			  			line-height: 36rpx;
			  			margin-bottom: 10rpx;
			  		}
			  
			  		.item-right-bottom {
			  			font-family: PingFang SC;
			  			font-weight: 400;
			  			font-size: 16rpx;
			  			color: #CCCCCC;
			  			line-height: 16rpx;
			  		}
			  		.orgecode{
			  			position: absolute;
			  			bottom: -40rpx;
			  			font-family: PingFang SC;
			  			font-weight: bold;
			  			font-size: 24rpx;
			  			color: #5C6652;
			  			line-height: 24rpx;
			  		}
			  	}
			  
		 }
		 
	}

	.adv-popup {
		 	::v-deep {
		 		.u-popup__content {
		 			background: transparent;
		 		}
		 
		 		.popup-content {
		 			padding: 0;
		 		}
		 	}
		 
		 	.close {
		 		position: absolute;
		 		width: 48rpx;
		 		height: 48rpx;
		 		top: 20rpx;
		 		right: 20rpx;
		 		z-index: 10;
		 	}
		 
		 	.wh100 {
		 		width: 600rpx;
		 		height: 800rpx;
		 		border-radius: 24rpx;
		 		background-size: contain;
		 		background-position: center;
		 		background-repeat: no-repeat;
		 	}
		 }
	
</style>